//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { CmsSiteLinks, CmsSiteLinksResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooCmsSiteLinksList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<CmsSiteLinksResponse>(`/uctoo/cms_site_links/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooCmsSiteLinks = async (id: string) => {
  return requestClient.get<CmsSiteLinks>(`/uctoo/cms_site_links/${id}`);
};

export const adductooCmsSiteLinks = async (data: Partial<CmsSiteLinks>) => {
  return requestClient.post<CmsSiteLinks>('/uctoo/cms_site_links/add', data);
};

export const edituctooCmsSiteLinks = async (data: Partial<CmsSiteLinks>) => {
  return requestClient.post<CmsSiteLinks>('/uctoo/cms_site_links/edit', data);
};

export const deleteuctooCmsSiteLinks = async (id: string) => {
  return requestClient.post<any>('/uctoo/cms_site_links/del', { id });
};
